import request from '@/utils/request'

// 系统详情
export function getSystemDetail(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/detail',
    method: 'get',
    params
  })
}

// 系统节点概览
export function getNodeList(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/abnormalWorkLoad/list',
    method: 'get',
    params
  })
}

// 请求量
export function getRequestTotal(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/requestTotal/line',
    method: 'get',
    params
  })
}

// 错误率
export function getErrorRate(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/errorRate/line',
    method: 'get',
    params
  })
}

// 响应时间
export function getRespTime(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/respTime/line',
    method: 'get',
    params
  })
}

//资源使用情况
export function getBasicResource(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/basicResource',
    method: 'get',
    params
  })
}

//CPU使用量
export function getCpuUsage(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/cpuUsageRange',
    method: 'get',
    params
  })
}

//内存使用量
export function getMemoryUsage(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/memoryUsageRange',
    method: 'get',
    params
  })
}

//磁盘使用量
export function getFsUsage(params) {
  return request({
    url: '/ebpf/proxy/apmServer-sl/system/fsUsageRange',
    method: 'get',
    params
  })
}
